(function () {

  angular.module('WfbPlatformApp').controller('BindController',
    ['$rootScope', '$scope', '$http', '$compile', 'http', '$q', 'transactionService',
      function ($rootScope, $scope, $http, $compile, http, $q, transactionService) {

        $scope.$on('$viewContentLoaded', function () {
          // initialize core components
        });

        $scope.$on('$includeContentLoaded', function () {

        });

        // 新增参数
        $scope.currentPage = 1;
        $scope.pageSize = 10;
        $scope.total = 0;
        $scope.contents = {};

        $scope.getWithdrawAddress = function (pageNo, pageSize) {

          var promise = transactionService.getWithdrawAddress({
            'pageNo': pageNo,
            'pageSize': pageSize
          })
          promise.then(function success(result) {
            // console.log(JSON.stringify(result));
            //成功回调
            $scope.contents = result.data;
            // 分页数
            $scope.total = result.totalCount;
          }, function error(error) {//错误回调
            // console.log(JSON.stringify(error));
          });
        };

        $scope.pageAction = function (message, page, pageSize, total) {

          $scope.getWithdrawAddress(page, pageSize);
        };

        $scope.getWithdrawAddress($scope.currentPage, $scope.pageSize);

      }]);
})();

